The present invention is concerned with the problem that a lamp current, on its path through an electronic ballast, cables and the lamp itself, flows through a resonant system with parasitic components with an inductive, capacitive and/or resistive nature. As a result, the form of the lamp current deviates from a predetermined setpoint value. A setpoint value is generally input by a DAC (digital-to-analog converter), by an RC element or by an R2R network. A DAC is firstly expensive and secondly its maximum operating frequency represents the maximum change frequency of the setpoint value. In the case of an RC element, different setpoint values can be generated by varying the duty cycle of a driving PWM signal. In this case, an RC element has a time constant τ. If the RC element is dimensioned such that the time constant τ is low, the setpoint value can follow rapid changes in level, but the ripple on the signal will be greater. Conversely, if τ is selected to be high, the ripple on the lamp current will be lower, but it is now only possible for slower changes in level to be performed. In the case of an R2R network for inputting the setpoint value, an enormous amount of complexity is involved: for example, 24 components are even required for implementing an 8-bit R2R network.